﻿<div ng-controller="cuentatutorController" class="container">

    <form class="form-horizontal" ng-submit="save()" ng-show="formVisibility">
        <div class="form-group">
            <label class="control-label col-xs-3">Estado de cuenta:</label>
            <div class="col-xs-9">
                <input type="radio" value="1" class="" placeholder="Descripcion" ng-model="cuenta.estado">Cancelado</br>
                <input type="radio" value="0" class="" placeholder="Descripcion" ng-model="cuenta.estado">Tiene deuda
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-3">Fecha de pago:</label>
            <div class="col-xs-9">
                <input type="date" class="form-control" placeholder="Fecha de pago" ng-model="cuenta.fechaPago">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-3">Moneda:</label>
            <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="Moneda" ng-model="cuenta.moneda">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-3">Cuenta:</label>
            <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="cuenta" ng-model="cuenta.cuenta_Id">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-3">Tutor:</label>
            <div class="col-xs-9">
                <input type="text" class="form-control" placeholder="tutor" ng-model="cuenta.tutor_Id">
            </div>
        </div>
        
        <br>
        <div class="form-group">
            <div class="col-xs-offset-3 col-xs-9">
                <button type="button" class="btn btn-default" ng-click="cancel()">Cancel </button>
                <button class="btn btn-primary" type="submit">Save</button>
            </div>
        </div>
    </form>

    <h3>CUENTA DE ALUMNOS</h3>
    <div class="table-responsive ">
        <table class="table table-striped table-bordered">
            <tr>
                <th>Estado</th>
                <th>fecha de pago</th>
                <th>cuenta</th>
                <th>tutor</th>
            </tr>
            <tr ng-repeat="d in cuentatutors">
                <td>{{d.estado}}</td>
                <td>{{d.fechaPago}}</td>
                <td>{{d.cuenta_Id}}</td>
                <td>{{d.tutor_Id}}</td>
                <td>
                    <button ng-click="selec(d)" type="button" class="btn btn-primary"><i class="glyphicon glyphicon-pencil"></i> <span>Editar</span></button>
                    <button ng-click="delete(d.id)" type="button" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i> <span>Eliminar</span></button>
                </td>

            </tr>
        </table>
    </div>
    <button ng-click="ShowForm()" ng-hide="formVisibility" type="button" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Agregar Cuenta</button>
</div>